package com.kube.design.observer;

import java.util.Observable;

/**
 * @author q.zhangr
 * @version 1.0.0
 * @date 2020/7/15
 */
public class ConcreteSubject extends Observable {

    private float price;

    public float getPrice() {
        return this.price;
    }

    public void setPrice(float price) {
        //设置内部标志位，注明数据发生变化
        super.setChanged();
        //通知观察者价格改变了
        super.notifyObservers(price);
        this.price = price;
    }


}
